package com.wetao.lib_common.greendao.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.ToMany;

import java.util.List;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.DaoException;
import com.wetao.lib_common.greendao.dao.DaoSession;
import com.wetao.lib_common.greendao.dao.WireQuestionPictureDao;
import com.wetao.lib_common.greendao.dao.WireQuestionDao;

@Entity
public class WireQuestion {
    public void setWireQuestionPictureList(List<WireQuestionPicture> wireQuestionPictureList) {
        this.wireQuestionPictureList = wireQuestionPictureList;
    }
    public List<WireQuestionPicture> getWireQuestionPictureList2() {
        return this.wireQuestionPictureList;
    }

    @Id(autoincrement = true)
    private Long id;

    //试题id
    @NotNull
    private Integer questionId;
    private Integer state;
    //试题序号
    private Integer questionNo;
    //试题分数
    private Float questionScore;
    //试题内容
    private String questionContent;
    //题干
    private String question;
    //options 选项
    private String options;// 是一个list, 使用###隔开
    //题目解析
    private String explain;
    //答案
    private String answers; // 是一个list, 使用###隔开
    //试题类型
    private Integer questionType;
    //是否单题 0场景题，1单题
    private Integer isSingle;
    private Integer answerType;
    private String answerContent;
    private Integer isRight;
    private Float myScore;
    private Integer screenIsView;
    private Integer screenBegin;
    private Integer screenEnd;
    //试题场景
    private String questionScreen;
    //场景类型：0:非完形填空 1:完形填空 2:听力题
    private Integer screenType;
    //场景id
    private Integer screenId;
    //听力资源url
    private String listeningUrl;
    //听力时长
    private Integer duration;
    //章节id
    private Integer chapterId;
    private Integer isCollect;
    private Integer isUndrestand;
    //选中的试题详情id
    private Integer questionDetailId;
    private Integer answerId;
    private String doodle;
    private String voiceComment;
    private String questionSite;


    //客观题的作答答案, 主观题如果做存储1
    private String myAnswer;
    //主观题是否涂鸦作答了
    private boolean isSubjectMyAns;

    @NotNull
    private Long assistantExamId;

    @ToMany(referencedJoinProperty = "wireQuestionId")
    List<WireQuestionPicture> wireQuestionPictureList;

    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    @Generated(hash = 649975032)
    private transient WireQuestionDao myDao;

    @Generated(hash = 754207700)
    public WireQuestion(Long id, @NotNull Integer questionId, Integer state,
            Integer questionNo, Float questionScore, String questionContent,
            String question, String options, String explain, String answers,
            Integer questionType, Integer isSingle, Integer answerType,
            String answerContent, Integer isRight, Float myScore,
            Integer screenIsView, Integer screenBegin, Integer screenEnd,
            String questionScreen, Integer screenType, Integer screenId,
            String listeningUrl, Integer duration, Integer chapterId,
            Integer isCollect, Integer isUndrestand, Integer questionDetailId,
            Integer answerId, String doodle, String voiceComment,
            String questionSite, String myAnswer, boolean isSubjectMyAns,
            @NotNull Long assistantExamId) {
        this.id = id;
        this.questionId = questionId;
        this.state = state;
        this.questionNo = questionNo;
        this.questionScore = questionScore;
        this.questionContent = questionContent;
        this.question = question;
        this.options = options;
        this.explain = explain;
        this.answers = answers;
        this.questionType = questionType;
        this.isSingle = isSingle;
        this.answerType = answerType;
        this.answerContent = answerContent;
        this.isRight = isRight;
        this.myScore = myScore;
        this.screenIsView = screenIsView;
        this.screenBegin = screenBegin;
        this.screenEnd = screenEnd;
        this.questionScreen = questionScreen;
        this.screenType = screenType;
        this.screenId = screenId;
        this.listeningUrl = listeningUrl;
        this.duration = duration;
        this.chapterId = chapterId;
        this.isCollect = isCollect;
        this.isUndrestand = isUndrestand;
        this.questionDetailId = questionDetailId;
        this.answerId = answerId;
        this.doodle = doodle;
        this.voiceComment = voiceComment;
        this.questionSite = questionSite;
        this.myAnswer = myAnswer;
        this.isSubjectMyAns = isSubjectMyAns;
        this.assistantExamId = assistantExamId;
    }

    @Generated(hash = 853725892)
    public WireQuestion() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getQuestionId() {
        return this.questionId;
    }

    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }

    public Integer getState() {
        return this.state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getQuestionNo() {
        return this.questionNo;
    }

    public void setQuestionNo(Integer questionNo) {
        this.questionNo = questionNo;
    }

    public Float getQuestionScore() {
        return this.questionScore;
    }

    public void setQuestionScore(Float questionScore) {
        this.questionScore = questionScore;
    }

    public String getQuestionContent() {
        return this.questionContent;
    }

    public void setQuestionContent(String questionContent) {
        this.questionContent = questionContent;
    }

    public String getQuestion() {
        return this.question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getOptions() {
        return this.options;
    }

    public void setOptions(String options) {
        this.options = options;
    }

    public String getExplain() {
        return this.explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public String getAnswers() {
        return this.answers;
    }

    public void setAnswers(String answers) {
        this.answers = answers;
    }

    public Integer getQuestionType() {
        return this.questionType;
    }

    public void setQuestionType(Integer questionType) {
        this.questionType = questionType;
    }

    public Integer getIsSingle() {
        return this.isSingle;
    }

    public void setIsSingle(Integer isSingle) {
        this.isSingle = isSingle;
    }

    public Integer getAnswerType() {
        return this.answerType;
    }

    public void setAnswerType(Integer answerType) {
        this.answerType = answerType;
    }

    public String getAnswerContent() {
        return this.answerContent;
    }

    public void setAnswerContent(String answerContent) {
        this.answerContent = answerContent;
    }

    public Integer getIsRight() {
        return this.isRight;
    }

    public void setIsRight(Integer isRight) {
        this.isRight = isRight;
    }

    public Float getMyScore() {
        return this.myScore;
    }

    public void setMyScore(Float myScore) {
        this.myScore = myScore;
    }

    public Integer getScreenIsView() {
        return this.screenIsView;
    }

    public void setScreenIsView(Integer screenIsView) {
        this.screenIsView = screenIsView;
    }

    public Integer getScreenBegin() {
        return this.screenBegin;
    }

    public void setScreenBegin(Integer screenBegin) {
        this.screenBegin = screenBegin;
    }

    public Integer getScreenEnd() {
        return this.screenEnd;
    }

    public void setScreenEnd(Integer screenEnd) {
        this.screenEnd = screenEnd;
    }

    public String getQuestionScreen() {
        return this.questionScreen;
    }

    public void setQuestionScreen(String questionScreen) {
        this.questionScreen = questionScreen;
    }

    public Integer getScreenType() {
        return this.screenType;
    }

    public void setScreenType(Integer screenType) {
        this.screenType = screenType;
    }

    public Integer getScreenId() {
        return this.screenId;
    }

    public void setScreenId(Integer screenId) {
        this.screenId = screenId;
    }

    public String getListeningUrl() {
        return this.listeningUrl;
    }

    public void setListeningUrl(String listeningUrl) {
        this.listeningUrl = listeningUrl;
    }

    public Integer getDuration() {
        return this.duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Integer getChapterId() {
        return this.chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public Integer getIsCollect() {
        return this.isCollect;
    }

    public void setIsCollect(Integer isCollect) {
        this.isCollect = isCollect;
    }

    public Integer getIsUndrestand() {
        return this.isUndrestand;
    }

    public void setIsUndrestand(Integer isUndrestand) {
        this.isUndrestand = isUndrestand;
    }

    public Integer getQuestionDetailId() {
        return this.questionDetailId;
    }

    public void setQuestionDetailId(Integer questionDetailId) {
        this.questionDetailId = questionDetailId;
    }

    public Integer getAnswerId() {
        return this.answerId;
    }

    public void setAnswerId(Integer answerId) {
        this.answerId = answerId;
    }

    public String getDoodle() {
        return this.doodle;
    }

    public void setDoodle(String doodle) {
        this.doodle = doodle;
    }

    public String getVoiceComment() {
        return this.voiceComment;
    }

    public void setVoiceComment(String voiceComment) {
        this.voiceComment = voiceComment;
    }

    public String getQuestionSite() {
        return this.questionSite;
    }

    public void setQuestionSite(String questionSite) {
        this.questionSite = questionSite;
    }

    public String getMyAnswer() {
        return this.myAnswer;
    }

    public void setMyAnswer(String myAnswer) {
        this.myAnswer = myAnswer;
    }

    public boolean getIsSubjectMyAns() {
        return this.isSubjectMyAns;
    }

    public void setIsSubjectMyAns(boolean isSubjectMyAns) {
        this.isSubjectMyAns = isSubjectMyAns;
    }

    public Long getAssistantExamId() {
        return this.assistantExamId;
    }

    public void setAssistantExamId(Long assistantExamId) {
        this.assistantExamId = assistantExamId;
    }

    /**
     * To-many relationship, resolved on first access (and after reset).
     * Changes to to-many relations are not persisted, make changes to the target entity.
     */
    @Generated(hash = 1442213774)
    public List<WireQuestionPicture> getWireQuestionPictureList() {
        if (wireQuestionPictureList == null) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            WireQuestionPictureDao targetDao = daoSession
                    .getWireQuestionPictureDao();
            List<WireQuestionPicture> wireQuestionPictureListNew = targetDao
                    ._queryWireQuestion_WireQuestionPictureList(id);
            synchronized (this) {
                if (wireQuestionPictureList == null) {
                    wireQuestionPictureList = wireQuestionPictureListNew;
                }
            }
        }
        return wireQuestionPictureList;
    }

    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    @Generated(hash = 2122692801)
    public synchronized void resetWireQuestionPictureList() {
        wireQuestionPictureList = null;
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }

    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 159244477)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getWireQuestionDao() : null;
    }


}
